<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /*function m1(){
        prompt();
        console.log("用户账户是"+prompt());
    }
    m1();
    function m2(){
        prompt();
        console.log("用户密码是"+prompt());
    }
    m2();*/



    /*for(var i=1;i<=2;i++){
        if(i==1){
            function m1(){
            prompt();
            console.log("用户账户是"+prompt());
            }
            m1();
        }
        if(i==2){
            function m2(){
            prompt();
            console.log("用户密码是"+prompt());
            }
            m2();
        }
    }*/





   var username=prompt("请输入你的用户名：");
  var  password=prompt("请输入你的密码：");

function m1(username,password){
    console.log("用户名为:"+username);
    console.log("密码为:"+password);
}
m1(username,password);




  </script>
</html>